const newsService = require("../../service/web/newsService")

const newsController = {
    getList: async (req, res) => {
        const result = await newsService.getList({ _id: req.params.id })

        res.send({
            ActionType: 'ok',
            data: result
        })
    },

    getTopList: async (req, res) => {
        console.log(req.query.limit)
        const result = await newsService.getTopList({ limit: req.query.limit })
        res.send({
            ActionType: 'ok',
            data: result
        })
    }
}


module.exports = newsController